package com.gzy.rpsm_admin.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.gzy.rpsm_admin.mapper.BuildingMapper;
import com.gzy.rpsm_admin.pojo.Building;
import com.gzy.rpsm_admin.pojo.PageResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BuildingServiceImpl implements BuildingService {
    @Autowired
    BuildingMapper buildingMapper;
    @Override
    public PageResult<Building> PageOfBuilding(Integer current
            ,Integer size,String number) {
        PageHelper.startPage(current, size);
        Page<Building> buildings =
                buildingMapper.findAllBuilding(number);
        return PageResult.restPage(buildings);
    }
}
